package com.buybuycat.buybuycat.merchant.wxapi

import android.util.Log
import com.common.pay.WeiXinPay
import com.tencent.mm.opensdk.modelbase.BaseResp
import com.tencent.mm.opensdk.modelmsg.SendAuth
import com.umeng.socialize.weixin.view.WXCallbackActivity

class WXEntryActivity : WXCallbackActivity() {

    override fun onResp(baseResp: BaseResp) {
        super.onResp(baseResp)
        if (baseResp is SendAuth.Resp) { //微信授权
            Log.e("weiXinAuth", "code=" + baseResp.code)
            Log.e("weiXinAuth", "state=" + baseResp.state)
            Log.e("weiXinAuth", "url=" + baseResp.url)
            WeiXinPay.getInstance(this).onAuthResp(baseResp.errCode, baseResp.errStr, baseResp.code)
        }
    }
}